package com.tbit.uqbike.compalint.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.toolkit.Db;
import com.tbit.uqbike.compalint.table.ComplaintHistoryDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.Collection;

/**
 * 客诉协商历史数据库操作mapper
 *
 * @author <a href="mailto:zhang.zhiliang@tbit.com.cn">Zhang ZhiLiang</a>
 * @version 1.0
 * @see <a href="http://adsl1.tbit.com.cn:21490/pages/viewpage.action?pageId=82182491">订单号规范</a>
 * @since 2025/2/14
 */
@Mapper
public interface ComplaintHistoryMapper extends BaseMapper<ComplaintHistoryDO> {
    /**
     * 批量插入数据库
     * @param entities 协商历史数据库实体列表
     * @return 成功插入返回 true ， 插入失败或者入参列表为空 返回false
     */
    default Boolean insertBatch(Collection<ComplaintHistoryDO> entities) {
        return Db.saveBatch(entities);
    }
}
